//
//  BSGzrOtherModel.m
//  BaiSiBuDeJie
//
//  Created by chaoyi on 16/8/29.
//  Copyright © 2016年 tsaievan. All rights reserved.
//

#import "BSGzrOtherModel.h"

@implementation BSGzrOtherModel


+ (NSDictionary *)objectClassInArray{
    return @{@"list" : @"List"};
}


+ (NSURLSessionDataTask *)loadDataWith:(NSString *)url andSuccessBlock:(void (^)(BSGzrOtherModel *infoList))successBlock andFailBlock:(void (^)(NSError *))failBlock andNoMoreBlock:(void(^)(NSString *str))noMoreBlock{
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    
    
    __block NSURLSessionDataTask *task =[manager GET:url parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        
        if([responseObject isKindOfClass:[NSDictionary class]]){
            
            BSGzrOtherModel *model = [BSGzrOtherModel mj_objectWithKeyValues:responseObject];
            
            //数据回调
            
            if(successBlock){
                
                successBlock(model);
            }
        }
        
        
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        
        if(failBlock){
            
            failBlock(error);
        }
    }];
    
    return task;
}


@end
@implementation List



@end


